package com.project.common.domain.entity;
import com.project.common.domain.po.BaseAutoKeyPO;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import lombok.Data;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import java.time.LocalDateTime;

/**
 * @author: 陈刚
 * @blame: 行业信息
 * @date: 2023/2/28 23:49
 **/
@Data
@MappedSuperclass
public class Industry extends BaseAutoKeyPO {
    @Schema(description = "创建人")
    @CreatedBy
    @Column(name = "create_by")
    private Long createBy;

    @Schema(description = "创建时间")
    @Column(name = "create_time")
    @CreatedDate
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @LastModifiedDate
    @Column(name = "update_time")
    private LocalDateTime updateTime;

    @Schema(description = "更新人")
    @CreatedBy
    @LastModifiedBy
    @Column(name = "update_by")
    private Long updateBy;

    @Schema(description = "行业名称")
    @Column(columnDefinition = "varchar(32) DEFAULT NULL  COMMENT '行业名称'")
    private String name;

    @Schema(description = "上级组ID")
    @Column(columnDefinition = "bigint DEFAULT NULL  COMMENT '父级ID'")
    private Long parentId;
}
